package communication.common.business.util;

import com.google.gson.Gson;

public class GsonUtils {

    private static final Gson gson = new Gson();

    public static String toJson(Object obj){
        return gson.toJson(obj);
    }

    public static <T> T toObj(String jsonStr,Class<? extends T> clazz){
        return gson.fromJson(jsonStr,clazz);
    }
}
